package com.yizhubao.app.adapters;

import androidx.annotation.NonNull;

import com.chad.library.adapter.base.BaseMultiItemQuickAdapter;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.yizhubao.app.R;
import com.yizhubao.app.beans.RecordDetailBean;

import java.util.List;

import h.framework.pacy.utils.ImageUtil;

/**
 * @author Pacy.
 * Date: 2021/6/17/017
 * Time: 20:30
 * Mail pengwwe457621023@qq.com
 * Info
 */
public class RecordDetailAdapter extends BaseQuickAdapter<RecordDetailBean.UrlListBean, BaseViewHolder> {

    public RecordDetailAdapter() {
        super(R.layout.record_detail_img);
    }

    @Override
    protected void convert(@NonNull BaseViewHolder helper, RecordDetailBean.UrlListBean item) {
        if(item.getType()==1){
          helper.setGone(R.id.play_iv,false);
        }else{
            helper.setGone(R.id.play_iv,true);
        }
        ImageUtil.loadImage(item.getUrl(),helper.getView(R.id.img_iv));
        helper.addOnClickListener(R.id.img_iv);
    }
}
